package com.tree.jvm.gc.mem;

/**
 * package com.tree.jvm.gc
 * description:
 *
 * -verbose:gc  -XX:+PrintGCDateStamps -XX:+PrintGCDetails
 *
 * @author tree
 * @date 2019-11-11 10:38
 */
public class ReferenceCountingGC {

    private Object instance = null;

    private static final int _1MB = 1024*1024;

    public static void main(String[] args) {
        testGC();
    }

    public static void testGC(){
        ReferenceCountingGC objA = new ReferenceCountingGC();
        ReferenceCountingGC objB = new ReferenceCountingGC();

        objA.instance = objB;
        objB.instance = objA;

        objA = null;
        objB = null;
        System.gc();


    }
}
